package com.joysuch.wwyt.bp.repository;

import com.joysuch.wwyt.bp.entity.inspect.BPInspectItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BPInspectItemDao extends JpaRepository<BPInspectItem, Long>, JpaSpecificationExecutor {

    public List<BPInspectItem> findAllByInspectTypeOrderBySeqNo(long inspectTypeId);

    @Query(value = "select max(seq_no) from WWYT_BP_INSPECT_ITEM", nativeQuery = true)
    Integer getMaxSeq();


}
